package com.travel.goodsApi;


import com.travel.entity.dto.ListResultVO;
import com.travel.entity.dto.ResultVO;
import com.travel.entity.goodsEn.TravelGoods;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Component
@FeignClient("travel-goods")
@RequestMapping("/goods/travel-goods")
public interface IGoodsAPI {

    /**
     * 根据typeId的类型去获取对应的商品(门票)
     * @param typeId
     * @return
     */
    @GetMapping("/findByTypeId/{typeId}")
    public ResultVO findListByTypeId(@PathVariable("typeId") String typeId);


    /**
     * 根据商户id 获取商品列表
     * @param shopId
     * @return
     */
    @GetMapping("/findListByShopId/{shopId}")
    public ListResultVO findListByShopId(@PathVariable("shopId") String shopId);


    /**
     * 根据supId查询所有的表的信息
     * @param supId
     * @return
     */
    @GetMapping("/findListBySpuId/{supId}")
    public List<TravelGoods> findListBySpuId(@PathVariable("supId") String supId);

}
